From: shand@ubuntu.eng.hq.xensource.com Date: Thu, 15 Sep 2005 04:12:54 +0000 (-0800) Subject: Deal with domain info going away (handle new error path introduced by X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16780^2~81^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7de330334af8be7046a67b7ece01c2eb8c9a4782;p=xen.git Deal with domain info going away (handle new error path introduced by cset 6828). Believe Dan Smith is working up a more comprehensive patch. Signed-off-by: Steven Hand --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index b5929ce88b..d611bec5a1 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -353,7 +353,12 @@ class XendDomainInfo: def update(self, info=None): """Update with info from xc.domain_getinfo(). """ - self.info = info or dom_get(self.domid) + if info: + self.info = info + else: + di = dom_get(self.domid) + if not di: + return self.memory = self.info['mem_kb'] / 1024 self.ssidref = self.info['ssidref']